package com.d0317;

public class ThreadStopExample  extends Thread{
    private boolean isRunning=true;

    @Override
    public void run() {
        while (isRunning){
            System.out.println("当前程序正在运行");
        }

    }




    public static void main(String[] args) {
        ThreadStopExample threadStopExample=new ThreadStopExample();
        threadStopExample.start();
        //threadStopExample.stop();
    }
}
